import { getMenus } from '@/api/table'

const state = {
  menusList: []
}
const mutations = {
  setMenusList(state, payload) {
    state.menusList = payload
  }
}
const actions = {
  async getMenus(context) {
    const res = await getMenus()
    // console.log(res)
    context.commit('setMenusList', res)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}

